<template>
    <div id="magicalDragScene" class="magicalcoder-dragging" style="overflow: auto;height: 300px;">
            <mc-el-row :data.sync="tableList"  mck="a" mcc="=" :mcv="aa"  :mc-config="{}" :mc-scroll="{'open':false}" :mc-page="{'open':false}">
              <template #query="scope">
                <el-col :span="24">
                  <el-form label-width="100px" :inline="true">
                    <el-button @click="scope.vue.apiAddRow({data:{}})" size="small" type="primary">新增行</el-button>
                  </el-form>
                </el-col>
              </template>
              <template #row="scope">
                <mc-el-col :span="24">
                  {{scope.row.name}}
                  <el-button type="text" icon="fa fa-trash-o" @click="scope.vue.apiDeleteRow({index:scope.rowIndex,pk:'id'})">删除行</el-button>
                  <el-button type="text" icon="fa fa-trash-o" @click="scope.vue.apiDuplicateRow({data:scope.row,index:scope.rowIndex+1,ignores:['id']})">复制行</el-button>
                  <el-button type="text" icon="fa fa-trash-o" @click="scope.vue.apiAddRow({data:{},index:scope.rowIndex})">向上加</el-button>
                  <el-button type="text" icon="fa fa-trash-o" @click="scope.vue.apiAddRow({data:{},index:scope.rowIndex+1})">向下加</el-button>
                </mc-el-col>
              </template>
            </mc-el-row>

        <el-button @click="print">打印</el-button>
        <el-button @click="change">改变</el-button>

    </div>
</template>

<script>
import McElRow from './components/McElRow'
import McElCol from './components/McElCol'
import McA from './components/McA'
export default {
    data(){
        return {
            aa:"123",
            tableList:[{name:"222"},{name:"111"}]
		    }
    },
    created(){
      window.iframeUi=""
    },
    components:{
      McElRow,
      McElCol,
      McA,
    },
    methods : {
      print(){
        console.log(this.tableList)
      },
      change(){
//          this.tab="2";
      }
    },
    mounted(){
      window.iframeUi=false;
    }
}
</script>

<style>

</style>
